From be3f0dad82b6e02afd320eecda5cd98af6baf34a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 18 Jan 2016 13:31:35 +0100 Subject: [PATCH] wayland: Unset button modifiers on pointer enter Due to implicit grabs, we basically can guarantee that the pointer won't have any buttons pressed at the time of wl_pointer.enter. Seems like a good place to unset any button modifiers that might have been left stale by compositor grabs. --- gdk/wayland/gdkdevice-wayland.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index fd2925c49f..cf98849931 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -1072,6 +1072,8 @@ pointer_handle_enter (void *data, device->pointer_focus = wl_surface_get_user_data(surface); g_object_ref(device->pointer_focus); + device->button_modifiers = 0; + device->surface_x = wl_fixed_to_double (sx); device->surface_y = wl_fixed_to_double (sy); device->enter_serial = serial; -- 2.30.2